package codeblock;

/**
 * @description:
 * @Author yyp
 * @time
 */
public class CodeBlockDetail04 {
    public static void main(String[] args) {
        new BBBB();
    }
}

class AAAA{
    static {
        System.out.println("AAAA的静态代码块");
    }
    {
        System.out.println("AAAA的普通代码块");
    }
    public AAAA(){
        //1 super()
        //2 调用本类的普通代码块
        System.out.println("AAAA()构造器被调用");
    }
}

class BBBB extends AAAA{
    static {
        System.out.println("BBBB的静态代码块");
    }
    {
        System.out.println("BBBB的普通代码块");
    }
    public BBBB() {
        //1 super()
        //2 调用本类的普通代码块
        System.out.println("BBBB()构造器被调用");
    }
}